#coding:utf-8
from bmob import *
import json
import datetime
from dateutil.relativedelta import relativedelta
import time
import pdb

class ParseHistory:
    def __init__(self):
        self.curr_date = datetime.date.today()
        self.b = Bmob("f5b3dbd027720a6f49c87b6a1a1c7a84", "616ee9149ae817bcd2f535b9a21050d4")
    def getResult(self, table_name, user_id):
        ret_str = self.b.find(
            table_name,
            BmobQuerier().addWhereEqualTo("user_id", user_id)
        ).stringData
        print(ret_str)
        lst_ret = []
        if not ret_str.strip() == "":
            lst_ret = json.loads(ret_str)['results']
        return lst_ret
    def getTrail(self):
